<script setup lang="ts">
import * as ec from 'echarts';
import { onMounted } from 'vue';

console.log("我是setup")

onMounted(() => {
    // 基于准备好的dom，初始化echarts实例
    var myChart = ec.init(document.getElementById('div_chart'));
    // 绘制图表
    myChart.setOption({
        title: {
            text: 'ECharts 入门示例'
        },
        tooltip: {},
        xAxis: {
            show: true,
            data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
        },
        yAxis: {},
        series: [
            {
                name: '销量',
                type: 'line',
                data: [5, 20, 36, 10, 10, 20]
            }
        ]
    });
})




</script>

<template>
    <!-- <div>sdfsdfsdf</div> -->
    <div id="div_chart"></div>
</template>

<style scoped>
.main {
    background: url(../../image/tyu.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    padding: 8vh 5vw;
    box-sizing: border-box;
}
</style>